package com.viewpagertext.utils;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;

public class HttpUtil {

   public static Call sendOkHttpRequest(String address, Callback callback){

       OkHttpClient client=new OkHttpClient.Builder()
               .sslSocketFactory(SSLSocketClient.getSSLSocketFactory())
               .hostnameVerifier(SSLSocketClient.getHostnameVerifier())
               .build();
       Request request = new Request.Builder().url(address).build();
       client.newCall(request).enqueue(callback);
       return client.newCall(request);
   }
}
